/**
 *T_RBAC_RES - 系统资源表 model object
 *author:yhb
 */
package com.towker.frame.model.rbac;

import java.io.Serializable;

import com.towker.frame.share.WebShare;


@SuppressWarnings("serial")
public class Resource implements Serializable
{
	// 主键
	private Long id = 0L;
	// 系统ID
	private Long systemid = 0L;
	// 上级资源ID
	private Long parentid = 0L;
	// 资源名称
	private String name = "";
	// 资源对应的url
	private String url = "";
	// 资源是否可见	private Long isvisable = 0L;
	// 资源是否为栏目或功能
	private Long isleaf = 0L;
	//是否展开
	private boolean open=false;
	@Override
	public String toString(){
		//if(!"".equals(icon)&&null!=icon)icon=WebShare.getCtx()+icon;
		//if(!"".equals(url)&&null!=url)url=WebShare.getCtx()+url;
		return"{id:"+id+",pid:"+parentid+",name:'"+name+"',icon:'"+icon+"',checked:"+assignedToRole+",open:"+open+",_url:'"+url+"'}";
	}

	// 资源排序
	private Long sequence = 0L;
	// 资源显示图标
	private String icon = "";
	//资源基础url
	private String baseurl="";
	//参数列表
	private String parameter="";
	//资源别名。
	private String alias="";
	private Long viewandoption=0L;
	// 数据库中没有对应的字段属性
	// 资源是否已经分配给了角色。
	private boolean assignedToRole = false;
	// 是否用户可用的资源。
	private boolean able = false;
	//是否加星号。
	private boolean star=false;
	//是否已经分配。
	private boolean assigned=false;
	//资源是否可见。
	private boolean visiable=false;
	private boolean showable=false;

	private int resType;
	
	public boolean isShowable()
	{
		return showable;
	}

	public void setShowable(boolean showable)
	{
		this.showable = showable;
	}

	public boolean isStar()
	{
		return star;
	}

	public void setStar(boolean star)
	{
		this.star = star;
	}

	public boolean isAble()
	{
		return able;
	}

	public void setAble(boolean able)
	{
		this.able = able;
	}

	public boolean isAssignedToRole()
	{
		return assignedToRole;
	}

	public void setAssignedToRole(boolean assignedToRole)
	{
		this.assignedToRole = assignedToRole;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId()
	{
		return this.id;
	}

	public void setSystemid(Long systemid)
	{
		this.systemid = systemid;
	}

	public Long getSystemid()
	{
		return this.systemid;
	}

	public void setParentid(Long parentid)
	{
		this.parentid = parentid;
	}

	public Long getParentid()
	{
		return this.parentid;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getName()
	{
		return this.name;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public String getUrl()
	{
		return this.url;
	}

	public void setIsvisable(Long isvisable)
	{
		this.isvisable = isvisable;
	}

	public Long getIsvisable()
	{
		return this.isvisable;
	}

	public void setIsleaf(Long isleaf)
	{
		this.isleaf = isleaf;
	}

	public Long getIsleaf()
	{
		return this.isleaf;
	}

	public void setSequence(Long sequence)
	{
		this.sequence = sequence;
	}

	public Long getSequence()
	{
		return this.sequence;
	}

	public String getIcon()
	{
		return icon;
	}

	public void setIcon(String icon)
	{
		this.icon = icon;
	}

	public boolean isAssigned()
	{
		return assigned;
	}

	public void setAssigned(boolean assigned)
	{
		this.assigned = assigned;
	}

	public boolean isVisiable()
	{
		return visiable;
	}

	public void setVisiable(boolean visiable)
	{
		this.visiable = visiable;
	}

	public String getBaseurl()
	{
		return baseurl;
	}

	public void setBaseurl(String baseurl)
	{
		this.baseurl = baseurl;
	}

	public String getParameter()
	{
		return parameter;
	}

	public void setParameter(String parameter)
	{
		this.parameter = parameter;
	}

	public String getAlias()
	{
		return alias;
	}

	public void setAlias(String alias)
	{
		this.alias = alias;
	}

	public Long getViewandoption()
	{
		return viewandoption;
	}

	public void setViewandoption(Long viewandoption)
	{
		this.viewandoption = viewandoption;
	}

	public boolean isOpen()
	{
		return open;
	}

	public void setOpen(boolean open)
	{
		this.open = open;
	}

	public int getResType() {
		return resType;
	}

	public void setResType(int resType) {
		this.resType = resType;
	}
}
